package com.lx.mobileplayer.mvp.persenter

import com.lx.mobileplayer.mvp.view.Iview.IBaseView
import java.lang.ref.WeakReference

/**
 * 类说明：Presenter的基类
 * Created by liuxiong on 2019/4/27.
 */
abstract class BasePresenter<T : IBaseView> (view:T){

    private lateinit var reference:WeakReference<T>

    init {
        reference=WeakReference(view)
    }

    fun getView():T{
       return reference.get()!!
    }
}